import panel from '@/components/chart/panel/index.vue'
import pie from '@/components/chart/pie/index.vue'
import bar from '@/components/chart/bar/index.vue'
import capsule from '@/components/chart/capsule/index.vue'
import scrollTable from '@/components/chart/table/index.vue'

import { BorderBox1, BorderBox2, BorderBox3, BorderBox4, BorderBox5, BorderBox6, BorderBox7, BorderBox8, BorderBox10, BorderBox11, BorderBox12, BorderBox13 } from '@/components/@dataview/datav-vue3'
import borderA001 from '@/components/chart/borderBox/borderA001.vue'
import borderA002 from '@/components/chart/borderBox/borderA002.vue'

import { panel as panelInitData, pie as pieInitData, table as scrollTableInitData, bar as barInitData, capsule as capsuleInitData } from '@/utils/chartInitData.js'

export const chartComponents = {
    panel: panel,
    pie: pie,
    scrollTable: scrollTable,
    bar: bar,
    capsule: capsule,
}

export const chartComponentName = {
    panel: '面板图',
    pie: '饼形图',
    scrollTable: '表格图',
    bar: '柱形图',
    capsule: '胶囊图',
}

export const chartComponentSql = {
    panel: `
    select 911 as value,'苹果' as name
    union all
    select 735 as value,'西瓜' as name
    union all
    select 580 as value,'哈密瓜' as name
    union all
    select 650 as value,'奶茶' as name
    union all
    select 484 as value,'烧烤' as name
    union all
    select 300 as value,'小龙虾' as name
    `,
    pie: `
    select 911 as value,'苹果' as name
    union all
    select 735 as value,'西瓜' as name
    union all
    select 580 as value,'哈密瓜' as name
    union all
    select 650 as value,'奶茶' as name
    union all
    select 484 as value,'烧烤' as name
    union all
    select 300 as value,'小龙虾' as name
    `,
    scrollTable: `
    select top 100 convert(varchar(10), sys_date, 120) as sys_date,name,spc from prdt
    `,
    bar: `
    select 911 as value,'苹果' as name
    union all
    select 735 as value,'西瓜' as name
    union all
    select 580 as value,'哈密瓜' as name
    union all
    select 650 as value,'奶茶' as name
    union all
    select 484 as value,'烧烤' as name
    union all
    select 300 as value,'小龙虾' as name
    `,
    capsule: `
    select 911 as value,'苹果' as name
    union all
    select 735 as value,'西瓜' as name
    union all
    select 580 as value,'哈密瓜' as name
    union all
    select 650 as value,'奶茶' as name
    union all
    select 484 as value,'烧烤' as name
    union all
    select 300 as value,'小龙虾' as name
    `,
}


export const chartComponentInitData = {
    panel: panelInitData,
    pie: pieInitData,
    scrollTable: scrollTableInitData,
    bar: barInitData,
    capsule: capsuleInitData
}


export const chartBorderComponent = {
    BorderBox1: BorderBox1,
    BorderBox2: BorderBox2,
    BorderBox3: BorderBox3,
    BorderBox4: BorderBox4,
    BorderBox5: BorderBox5,
    BorderBox6: BorderBox6,
    BorderBox7: BorderBox7,
    BorderBox8: BorderBox8,
    BorderBox10: BorderBox10,
    BorderBox11: BorderBox11,
    BorderBox12: BorderBox12,
    BorderBox13: BorderBox13,
    BorderBox12: BorderBox12,
    borderA001: borderA001,
    borderA002: borderA002,
}